package ink.metoo.gude.util

object SecureCodeUtils {

    // 移除了容易混淆的字符: 0/O, 1/I, 2/Z, 5/S, 8/B
    const val SECURE_CODE_CHARS = "ABCDEFGHJKLMNPQRSTUVWXY345679"

    fun generateSecureCode(length: Int = 6): String {
        return (1..length)
            .map { SECURE_CODE_CHARS.random() }
            .joinToString("")
    }

}